package cn.cool.middleware.biz_exception_retry.types.common.context;

public class RetryContext {
    // 重试标记位
    private static final ThreadLocal<Boolean> RETRY_TAG = new ThreadLocal<>();

    public static void set(Boolean tag) {
        RETRY_TAG.set(tag);
    }

    public static Boolean get() {
        return Boolean.TRUE.equals(RETRY_TAG.get());
    }

    public static void remove() {
        RETRY_TAG.remove();
    }
}
